{template 'common/header'}

<div class="main">
    <form class="form-horizontal form" action="{$url}" method="post" id="form1">
        <input type="hidden" name="id" value="{$row['id']}" />

        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-3 col-lg-2 control-label">凭证图片</label>
            <div class="col-sm-6">
                {php echo tpl_form_field_scan('thumb', $row['thumb'], '', $options = array('global' => true));}
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-3 col-lg-2 control-label">发送短信</label>
            <div class="col-sm-6">
                <label for="need_send_1" class="radio-inline"><input type="radio" name="need_send" id="need_send_1" value="1" {if $row['needsend']==1 }checked="checked" {/if} > 是</label>
                <label for="need_send_0" class="radio-inline"><input type="radio" name="need_send" id="need_send_0" value="0" {if empty($row['needsend']) }checked="checked" {/if} > 否</label>
                <div class="help-block">开启此项后，选择需要发送短信的模板及接收人员。</div>
            </div>
        </div>


        <div class="form-group">
            <label class="col-xs-12 col-sm-3 col-md-3 col-lg-2 control-label"> </label>
            <div class="col-sm-6">

                <button  class="btn btn-danger" value="audit" onclick="$('#modal-module').modal();"><i class="fa fa-eye"></i> 测试</button>&nbsp;

                <button type="submit" class="btn btn-primary btn-default" name="submit" value="save"><i class="fa fa-save"></i>保存数据</button>

                <input type="hidden" name="token" value="{$_W['token']}" />
            </div>
        </div>
    </form>
</div>
<div id="modal-module" class="modal  fade " role="dialog" tabindex="-1" >
    <div class="modal-dialog"  aria-hidden="true" style=" width:600px;">
        <div class="modal-content">
            <div class="modal-header">
                <button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button><h3>选择短信接收人</h3>
            </div>
            <div class="modal-body" style="max-height: 300px">
                <div style="text-align:center;" >
                    <object classid="clsid:454C18E2-8B7D-43C6-8C17-B1825B49D7DE" id="captrue"  width="400" height="300" ></object>
                </div>
            </div>

            <div class="modal-footer"><a href="#" class="btn" data-dismiss="modal" aria-hidden="true">关闭</a></div>
        </div>
    </div>
</div>
<script type="text/javascript">
    function search_entries() {
        var ids=getids().join(',');
        $.post("{php echo url('sms/sendee/query')}", {ids:ids}, function(dat){
            $('#module-items').html(dat);
        });
    }

    function select_entry(o) {
        var html = '<tr>' +
                '<td>'+o.name+'</td>' +
                '<td>'+ o.mobile+'</td>'+
                '<td>'+ o.worktitle+'</td>'+
                '<td style="text-align:center;width:50px;">'+
                '<input type="hidden" name="ids[]" value="'+o.id+'"/>'+
                '<a onclick="$(this).parent().parent().remove();"title="删除"><i class="fa fa-times"></i></a>'+
                '</td></tr>';
        $('#form-items').append(html);
    }
    require(['jquery', 'util'], function($, u){

            });

</script>
{template 'common/footer'}